package com.pmcc.core.repository;
import com.pmcc.core.entity.Organization;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by Tomas on 2018/4/9.
 */
public interface OrganizationRepository extends JpaRepository<Organization, String> {
    Page<Organization> findAll(Specification<Organization> spec, Pageable var1);
    List<Organization> findByCode(String code);
    List<Organization> findByParentId(String parentId);
    List<Organization> findByParentIdAndCode(String parentId,String code);
    List<Organization> findByParentIdOrderByCodeAsc(String parentId);
}

